<?php $this->load->view('header',array('title'=>$title));?>
<style>
<!--
body, html {
	  background-color: #FFF;		
}
#box-table-a {
    border-collapse: collapse;  
    font-size: 12px;    
    text-align: left;
    width: 100%;
    margin-bottom:50px;
}
#box-table-a th {
    background: none repeat scroll 0 0 #E7E5E2;
    border-bottom: 1px solid #D0CDC7;
    border-top: 4px solid #888888;  
    font-size: 13px;
    font-weight: normal;
    padding: 8px;
}
#box-table-a td {
    background: none repeat scroll 0 0 #FFF;
    border-bottom: 1px solid #D0CDC7;
    border-top: 1px solid transparent;   
    padding: 8px;
}
#box-table-a tr:hover td {
    background: none repeat scroll 0 0 #DDDDDD;
}
table td{
	 padding: 8px;
}
#empty {
    background: url("http://img03.taobaocdn.com/tps/i3/T1TvXUXnNjXXXXXXXX-100-100.png") no-repeat scroll 40px 46px transparent;
    padding: 48px 0 100px 156px;
}
-->
</style>


<div style="margin:120px 50px 0 50px;">
<?php if($data):?>
<table summary="Employee Pay Sheet" id="box-table-a">
    <thead>
    	<tr>
        	<th scope="col">图片</th>
            <th scope="col">商品名称</th>
            <th scope="col">销售价格</th>
            <th scope="col">优惠价格</th>
            <th scope="col">数量</th>
            <th scope="col">小计</th>
            <th scope="col">操作</th>
        </tr>
    </thead>
    <tbody>
    	<?php foreach($data as $d):?>
    	<tr goodsid="<?php echo $d['goods_id']?>">
        	<td><img src="<?php echo $d['goods_thumb']?>"/></td>
            <td><?php echo $d['goods_name']?></td>
            <td>￥<?php echo $d['market_price']?></td>
            <td class="unitprice">￥<?php echo $d['shop_price']?></td>
            <td class="cart_action"><a class="decrease" href="javascript:void(0)" style="font-weight:bold;font-size:30px" >-</a>&nbsp;<input type="text"  class="gnums" style="font-size:20px;width:30px;text-align:center" value="<?php echo $d['sum']?>" />&nbsp;<a href="javascript:void(0)" class="increase" style="font-weight:bold;font-size:25px">+</a></td>
            <td class="price">￥<?php echo $d['price']?></td>
            <td><a href="<?php echo site_url('cart/remove/'.$d['goods_id'])?>" onclick="return confirm('你确定要这样做吗？');">删除</a></td>
        </tr>
        <?php endforeach;?>
       
    </tbody>
</table>
<?php else:?>
<div class=""  id="empty">    
	<h2>您的购物车还是空的，赶紧行动吧！您可以：</h2>
	    <ul>
				<li>马上去 
    		    		<a target="_blank" class="J_MakePoint" data-point-url="http://www.atpanel.com/jsclick?cache=3578777&amp;cartlist=selectauc" href="http://ju.atpanel.com/?url=http://love.taobao.com/guang/index.htm?&amp;ad_id=&amp;am_id=&amp;cm_id=&amp;pm_id=15010035269f8e393dca">看黄钻买家正在买什么</a>
    				</li>
		
					<li>看看 <a class="J_MakePoint" data-point-url="http://www.atpanel.com/jsclick?cache=1968652&amp;cartlist=bought" target="_blank" href="http://trade.taobao.com/trade/itemlist/list_bought_items.htm">已买到的宝贝</a></li>
		    </ul>
</div>
<?php endif?>
	<div style="border:1px solid #D0CDC7;padding:20px 20px">
	<table style="float:right">
	<tr><td  style="vertical-align:top">当前享受的订单优惠：</td><td>
	<ul><li>1、全场免运费</li><li>2、幸运大礼，每天一百名，数量有限，送完为止</li></ul>
	</td></tr>
	<tr><td style="font-size:14px">商品总额：</td><td id="cart_sum" style="font-weight:bold;font-size:14px">
	￥0
	</td></tr>
	</table>
	<div style="clear:both;"></div>
	</div>
	<div style="padding:20px 0px;position:relative;">
		<a href="<?php echo site_url('category/index/1')?>" class="button">继续购物</a><a href="<?php echo site_url('cart/deleteall')?>" class="button" onclick="return confirm('你确定要这样做吗？');">清空购物车</a><a style="position:absolute;right:0;" href="<?php echo site_url('order/create')?>" class="button hl">去结算》</a>
	</div>	
</div>
<?php $this->load->view('widgets/nav');?>
<div class="plus" style="position: absolute; background: url('<?php echo base_url('style/images/ico_zoom.png')?>') no-repeat scroll 45px 85px transparent; width: 200px; height: 140px; cursor: pointer; top: 0px; left: 0pt; display: block; visibility: visible; z-index: 1001; opacity: 1;"></div>
<?php $this->load->view('footer');?>